1. Field of the Invention
This invention relates to a video signal coding apparatus and method, and a video signal decoding apparatus and method, and more particularly, relates to the video signal coding apparatus and method, and the video signal decoding apparatus and method which reduce the amount of generating code by detecting feature points of motion picture and chain coding the data of the feature points.
2. Description of the Related Art
Heretofore, in a system for transmitting a picture under the limited transmission band and a system for recording a picture in the recording media having the limited storage capacity, the low bit rate coding method to efficiently compress the picture data with fewer code is employed. As the method for coding video signal efficiently, a method in which input video signal is orthogonally transformed using DCT (Discrete Cosine Transform) and then suitably quantized according to the human visual characteristics in each frequency band, and the other method in which a picture is divided into subbands by the Wavelet base (the Wavelet transform) and each subband is weighted and coded have been used. According to these methods, the visual distortion is not conspicuous and high compression rate can be obtained.
However, in these coding methods, as the compression rate is increased, the block starts distorting and visually undesirable effects become obvious. Thus, a structure extraction coding system which extracts feature points of the picture structure (for example, points constructing edges (pixels)) and efficiently encodes the picture data at the feature points by picture feature point detection has been introduced as the coding system which does not produce visually undesirable distortion due to the high compression rate. The structure extraction coding system has been proposed in the specification and drawings of the U.S. patent Ser. No. 08/457,830 filed in Jun. 1, 1995 by this applicant.
FIG. 1 shows the construction of one example of a picture encoding apparatus for compressing a picture by the structure extraction coding method. In the picture encoding apparatus 1, input video signal S1 is input to a quantizer 2 and a two-dimensional change point detection circuit 3. The quantizer 2 quantizes the input video signal S1 and forms quantized coefficient S2. The quantized coefficient S2 is supplied to a chain coding circuit 4. The two-dimensional change point detection circuit 3 detects whether or not the input video signal S1 is feature point. The two-dimensional change point detection circuit 3 outputs feature point signal S3 of which value is "1" for example to the chain coding circuit 4 if the input video signal S1 is the feature point, and outputs the feature point signal S3 of which value is "0" for example to the chain coding circuit 4 if the input video signal S1 is not the feature point.
After the quantization by the quantizer 2 and the feature point detection by the two-dimensional change point detection circuit 3 have completed on one whole screen (one frame), the chain coding circuit 4 chain codes the position information on the point at which the feature point signal S3 is "1" (pixel) (the position of the feature point (coordinates)) in accordance with the quantized coefficient S2 and the feature point signal S3. Further, after multiplexing the quantized coefficient at the position of the feature point (the quantized coefficient of picture data at the pixel detected as feature point) to the position information, the chain coding circuit 4 outputs this as chain coding signal S4.
The chain coding signal S4 is supplied to a chain threshold circuit 5. The chain threshold circuit 5 removes the chain having the chain length of a threshold value T and below, and the removed chain coding signal is supplied to a buffer memory 6 as threshold chain coding signal S5. The threshold chain coding signal S5 is supplied to the buffer memory 6 to be stored once and then recorded in a recording media (not shown) or outputted to a transmission line. Output signal S6 of the buffer memory 6 is recorded in the recording media (not shown) as output signal of the picture encoding apparatus 1, or outputted to the transmission line. In addition, the buffer memory 6 is stored once the signal, so that the data size of the output signal S6 is smoothed. Therefore, the output signal of the picture encoding apparatus 1 is outputted to the recording media or the transmission line with the approximately constant data rate.
Here, the chain coding circuit 4 is constructed as shown in FIG. 2. The chain coding circuit 4 stores the quantized coefficient S2 in a coefficient frame buffer 10, and the feature point signal S3 in a mask frame buffer 11 respectively.
At this point, a X-coordinate register 12, a Y-coordinate register 13 and a status register 14 are initialized to "0" at the head of each frame. Moreover, a direction search device 15 holds the 0th to 2nd status referring to the content of the status register 14 until the X-coordinate register 12 and Y-coordinate register 13 point out the final coordinates of the frame, and repeats the following functions depending on the aforementioned 0th to 2nd status.
More specifically, at the 0th status, the direction search device 15 stores the coordinates of the point next to the coordinates presently stored in the X-coordinate register 12 and Y-coordinate register 13 observing in the order of line scanning, and makes this as the point coordinates to be processed. The direction search device 15 inputs the mask value of this point coordinates from the mask frame buffer 11, however, in the case where the mask signal is "0", it performs nothing.
On the other hand, if the mask signal S10 is "1", the direction search device 15 stores this point coordinates in a search X-coordinate register 16 and a search Y-coordinate register 17, and simultaneously initializes a counter 18 to "0" and then as well as outputting X, Y-coordinates of this point to a selector 19 as start point coordinates output S11, outputs "1" to a multiplexer 20 and a latch circuit 21 as effective data selection signal S12, and then inputs "1" to the status register 14.
After the above processing is complete, the direction search device 15 sets the mask value of the coordinates of this point in the mask frame buffer 11 to "0".
In this connection, the counter 18 is formed by three bit counter and adapted to output "0" to "7" as the count values.
When the direction search device 15 confirms that "1" is inputted in the status register 14, it becomes the first status. Under this first status if the mask value S10 of the coordinates specified by address signal S13 in the mask frame buffer 11 is "0", the direction search device 15 inputs "0" to the status register 14 when count value of the counter 18 is "7", and increments the count value of the counter 18 when the count value is less than "7".
On the other hand, in the case where the mask signal S10 is "1", the direction search device 15, as well as outputting "1" as effective data selection signal S12, sets the mask value of the point to which the mask frame buffer 11 corresponds to "0" and then inputs "2" to the status register 14.
The direction search device 15, upon confirming that "2" is inputted in the status register 14, becomes the second status. Under this second status if mask signal S10 of the coordinates specified by the address signal S13 in the mask frame buffer 11 is "0", the direction search device 15 inputs "0" to the status register 14 when the count value of the counter 18 is "7", and increments the count value of the counter 18 when the count value is less than "7".
On the other hand, in the case where the mask signal S10 is "1", it outputs "1" as effective data selection signal S12, and makes the mask value of the point to which the mask frame buffer 11 corresponds to "0".
A search X-coordinate ROM 23 and a search Y-coordinate ROM 24, making counter output S14 as address signal input, output X differential signal S15 and Y differential signal S16 to adders 25 and 26 respectively. Also, a direction ROM 27 outputs direction signal S17 to a latch circuit 21, a direction change signal generator 28, and a selector 19 making the counter output S14 as the address signal input.
An example of contents of the search X-coordinate ROM 23, search Y-coordinate ROM 24, and direction ROM 27 is shown in FIG. 3. Here, direction codes C0 to C7 used in the direction ROM 27 show each direction divided into eight, centering around A as shown in FIG. 4.
The address generator 22 receives search X-coordinate signal S18 which is the sum of the contents of search X-coordinate register 16 and X differential signal S15, and search Y-coordinate signal S19 which is the sum of the content of search Y-coordinate register 17 and Y differential signal S16, and the address generator 22 outputs address signal S13 to specify the readout address of (X, Y) coordinates in the coefficient frame buffer 10 and the mask frame buffer 11.
The latch circuit 21 holds the direction signal S17 when the effective data selection signal S12 is "1", and keeps holding it until the effective data selection signal S12 becomes "1" at the next time, and then obtains previous direction signal S20 by delaying for one sample and outputs this to the direction change signal generator 28.
The timing relation of effective data selection signal S12, direction signal S17, and the previous direction signal S20 is shown in FIG. 5. For explanation, direction codes of the direction signal S17 are lined up in numerical order of C0 to C38 in FIG. 5. However, in practice, direction codes are arranged according to the detected result of feature points.
The direction change signal generator 28 is inputted direction signal S17 and previous direction signal S20, and then outputs direction change signal S21 according to tables shown in FIG. 6 and FIG. 7. More specifically, the direction change signal generator 28 outputs direction change codes D0 to D5 or D6 corresponding to the direction change, such that if the present direction has not changed with respect to the previous direction, D0 is outputted as the direction change code, and if the present direction has changed by 45.degree., D1 is outputted, and if it has changed by 90.degree., D2 is outputted, and so on. In practice, as shown in FIG. 8, the code words having a small number of bits are allocated to the direction change codes having high occurrence probability, such as D0 and D1, and the code words having a large number of bits are allocated to the direction change codes having small occurrence probability, such as D3 and D6, i.e., the entropy coding is conducted in order to reduce the volume of information.
At the time when the effective data selection signal S12 is "1", the selector 19 refers the value of status register 14. In the case where the value of said status register 14 is "0", the selector 19 outputs the starting point coordinates output S11 to the multiplexer 20 as the position signal 22, in the case where the value of said status register 14 is "1", it outputs the direction signal S17, and when the value is "2", it outputs direction change signal S21.
At the time when the effective data selection signal S12 is "1", the multiplexer 20 multiplexes coefficient output S23 from the coefficient frame buffer 10, and position signal S22, and outputs these to the following chain threshold circuit 5 (FIG. 1) as the chain code signal S4.
With this arrangement, after the chain coding circuit 4 detects the feature point of the head of chain under the 0th status, it detects pixels around the feature point at the head of chain under the first status, and in the case where the feature point exists in the surrounding area, connects this feature point to the feature point at the head of chain by showing this feature point with direction signal S17, and then proceeds to the second status and searches pixel around the feature point detected at the first status. And in the case where the feature point exists in the surrounding area, connects this feature point to the feature point detected under the first status by showing this with direction change signal S21. Under the second status, if feature points are detected again around the feature points previously detected, the chain coding circuit 4 connects these feature points sequentially by showing these feature points with direction change signal S21.
Furthermore, under the first or the second status, in the case where no feature point exists around the feature point detected previously, this chain will be cut off and it returns to the 0th status and searches for the feature point to become the head of next chain in order of line scanning.
In the conventional chain coding system, edge chains having less than the fixed length T have been removed as noise by the chain threshold circuit 5 (FIG. 1) of the later stage, assuming that the contour of an object would be coded by one edge chain.
However, in the case where noise exists in the vicinity of contour of the object, there have been a problem that the contour of one object would be coded as multiple chain edges and coding efficiency became worse.
In the picture encoding apparatus using the structure extraction coding system described above, on status that the edge of one object is coded with one edge chain, the chain having the length of the predetermined length T and below is removed as noise by the chain threshold circuit 5 (FIG. 1) at the latter stage of the chain coding circuit 4.
However, there has been a problem that, by using such method, the edge of one object is encoded as plural edge chains if noise exists in vicinity of the object, so that the coding efficiency became worse.
Furthermore, if the thresholding are conducted by the length T on the chain coded edge, the edge chain of the object contour would be cut off as shown in FIG. 9.
Moreover, in the case where the object contours were branched, independent multiple chains would be formed, and as a result, coding efficiency has decreased.